package 测试;

public class 小东分苹果 {

	public static void main(String[] args) {

	}

}

class Apples {
	public int getInitial(int n) {
		int r = 0;
		for (int i = 2; i <= Integer.MAX_VALUE; i++) {
			r = i;
			if ((r - 1) % n != 0) {
				continue;
			}
			int times = n;
			int res = 0;
			while (times >= 1) {
				if ((r - 1) % n != 0) {
					break;
				}
				res = r - 1 - (r - 1) / n;
				r = res;
				times--;
			}
			if (times == 0) {
				r = i;
				break;
			}
		}
		return r;
	}
}